<?php

/**
 * Modifies the format accepted for colors
 *
 */
class Db_008_bbce_modify_allowed_color_fields extends Ot_Migrate_Migration_Abstract
{
    public function up($dba)
    {
        $query = "
            ALTER TABLE  `" . $this->tablePrefix . "tbl_plugin_slidestreamoption_marquee` CHANGE  `textColor`  `textColor` VARCHAR( 7 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT  '#FFFFFF',
            CHANGE  `bgColor`  `bgColor` VARCHAR( 7 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT  '#000000'
        ";
        
        $dba->query($query);
        
        $query = "
            ALTER TABLE  `" . $this->tablePrefix . "tbl_plugin_slidetype_flickr` CHANGE  `bgColor`  `bgColor` VARCHAR( 7 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
        ";
        
        $dba->query($query);
        
        $query = "
                ALTER TABLE  `" . $this->tablePrefix . "tbl_plugin_slidetype_image` CHANGE  `bgColor`  `bgColor` VARCHAR( 7 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL        
        ";
        
        $dba->query($query);
    }

    public function down($dba) {
        
    }    
}